/**
 * Copyright © 2013 Creativor Studio.
 * About license information, please see LICENSE.txt.
 */
package org.creativor.rayson.demo.simple;

import java.net.InetSocketAddress;

import org.creativor.rayson.api.NetworkException;
import org.creativor.rayson.api.exception.IllegalProtocolException;
import org.creativor.rayson.client.Rayson;

/**
 * @author creativor An simple demo show how to use Rayson.
 */
class SimpleClient {

	/**
	 * @param args
	 * @throws IllegalProtocolException
	 * @throws NetworkException
	 */
	public static void main(final String[] args)
			throws IllegalProtocolException, NetworkException {

		final InetSocketAddress serverAddr = new InetSocketAddress("localhost",4410);
		final EchoProtocol echoProxy = Rayson.createProxy(serverAddr,
				EchoProtocol.class);
		System.out.println(echoProxy.echo("hello world"));
	}

}
